package com.hsp.homework;



public class Homework04 {
    public static void main(String[] args) {
        new com.hsp.homework.Worker("lyli", 200, 25, 1.0).printSalary();

    }
}

class Employ{
    private String name;
    private int salary;
    private int workDay;
    private double grade;

    public Employ(String name, int salary, int workDay,double grade) {
        this.name = name;
        this.salary = salary;
        this.workDay = workDay;
        this.grade = grade;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getSalary() {
        return salary;
    }

    public void setSalary(int salary) {
        this.salary = salary;
    }

    public int getWorkDay() {
        return workDay;
    }

    public void setWorkDay(int workDay) {
        this.workDay = workDay;
    }

    public double getGrade() {
        return grade;
    }

    public void setGrade(double grade) {
        this.grade = grade;
    }

    public void printSalary(){
        System.out.println("工资：");
    }
}

class Manager extends Employ{
    public Manager(String name, int salary, int workDay, double grade) {
        super(name, salary, workDay, grade);
    }

    @Override
    public void printSalary() {
        System.out.println("经理"+this.getName()+"的工资是："+1000+this.getSalary()*this.getWorkDay()*this.getGrade());
    }
}
class Worker extends Employ{
    public Worker(String name, int salary, int workDay, double grade) {
        super(name, salary, workDay, grade);
    }

    @Override
    public void printSalary() {
        System.out.println("工人"+this.getName()+"的工资是："+this.getSalary()*this.getWorkDay()*this.getGrade());;
    }
}